<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function() {
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('diary/flexigrid') ?>',
                    colModel: [
                        {display: '<?= translate('diary_ID') ?>', name: 'id', width: 140, iskey: true},
                        {display: '<?= translate('diary_NAME') ?>', name: 'name', width: 100},
                        {display: '<?= translate('TYPE') ?>', name: 'diaryType', width: 50, process: formatSearch},
                        {display: '<?= translate('diary_COMPOSE') ?>', name: 'canCompose', width: 50},
                        {display: '<?= translate('diary_QUALITY') ?>', name: 'quality', width: 50, process: formatSearch},
                        {display: '<?= translate('COPPER') ?>', name: 'copperBuyPrice', width: 50, process: formatSearch, sortable: false},
                        {display: '<?= translate('GESTE') ?>', name: 'gesteBuyPrice', width: 50, process: formatSearch, sortable: false},
                        {display: '<?= translate('GOLD') ?>', name: 'goldBuyPrice', width: 50, process: formatSearch, sortable: false},
                        {display: '<?= translate('diary_DESC_1') ?>', name: 'desc1', width: '15%', sortable: false},
                        {display: '<?= translate('diary_DESC_2') ?>', name: 'desc2', width: '30%', sortable: false},
                        {display: '<?= translate('diary_DESC_3') ?>', name: 'desc3', width: '100', sortable: false, hide: true},
                        {display: '<?= translate('diary_PRICE') ?>', name: 'sellPrice', width: 80},
                        {display: '<?= translate('MANAGE') ?>', name: 'id', width: 135, sortable: false, process: formatOp, toggle: false}
                    ],
                    buttons: [
                        {name: 'add', displayname: "<?= translate('ADD') ?>", title: "<?= translate('ADD') ?>", bclass: 'add', onpress: multi},
                        {name: 'delete', displayname: "<?= translate('DEL') ?>", title: "<?= translate('DEL') ?>", bclass: 'delete', onpress: multi},
                        {separator: true}
                    ],
                    searchdiarys: true,
                }));
                SG.admin = $.extend(SG.admin, {
                    add_url: '<?= site_url("diary/add") ?>',
                    edit_url: '<?= site_url("diary/edit/") ?>',
                    del_url: '<?= site_url("diary/del/") ?>',
                    multi_url: '<?= site_url("diary/multi/") ?>'
                });
            });
        </script>
    </body>
</html>